<ng-container *ngFor="let item of items;let i = index ">
  <ng-container *ngIf="itemTemplate else defaultTemplate;">
    <!-- 自定义label -->
    <span class="radio-group-item">
      <input
        type="radio"
        [name]="name || uniqueName"
        [id]="item.id"
        tiRadio
        [(ngModel)]="model"
        [attr.disabled]="item.disabled ? '': undefined"
        [value]="item[valueKey] || item[labelKey]"
      />
      <ng-container *ngTemplateOutlet="itemTemplate;context: {$implicit: item,index: i}"></ng-container>
    </span>
  </ng-container>
  <!-- 默认label -->
  <ng-template #defaultTemplate>
    <input
      type="radio"
      [name]="name || uniqueName"
      [label]="item[labelKey]"
      tiRadio
      [(ngModel)]="model"
      [id]="appendId(item.id || i)"
      [attr.disabled]="item.disabled ? '': undefined"
      [value]="item[valueKey] || item[labelKey]"
    />
  </ng-template>
</ng-container>
